<?php

namespace Unl\HomologacionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;


/**
* @ORM\Entity(repositoryClass="Unl\HomologacionBundle\Repository\UnidadTiempoRepository")
*/
class UnidadTiempo
{
    /**
    * @ORM\Id
    * @ORM\Column(type="bigint")
    * @ORM\GeneratedValue(strategy="AUTO")
    */
    protected $id;

    /**
    * @ORM\Column(type="string", length=100)
    * @Assert\NotBlank()
    */
    protected $nombre;

    /**
    * @ORM\OneToMany(targetEntity="MallaCurricular", mappedBy="unidadTiempo", cascade={"all"}, orphanRemoval=true)
    */
    protected $mallasCurriculares;

    public function __construct()
    {
        $this->mallasCurriculares = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Get id
     *
     * @return bigint 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nombre
     *
     * @param string $nombre
     */
    public function setNombre($nombre)
    {
        $this->nombre = $nombre;
    }

    /**
     * Get nombre
     *
     * @return string 
     */
    public function getNombre()
    {
        return $this->nombre;
    }

    /**
     * Add mallasCurriculares
     *
     * @param Unl\HomologacionBundle\Entity\MallaCurricular $mallasCurriculares
     */
    public function addMallaCurricular(\Unl\HomologacionBundle\Entity\MallaCurricular $mallasCurriculares)
    {
        $this->mallasCurriculares[] = $mallasCurriculares;
    }

    /**
     * Get mallasCurriculares
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getMallasCurriculares()
    {
        return $this->mallasCurriculares;
    }

    public function __toString()
    {
        return $this->nombre;
    }

}